package com.serviceImpl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class demo2 {
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext2.xml");

	    demo computer = (demo) context.getBean("user");
	    while(true) {
	    try {
			Thread.sleep(1000); 
			System.out.println(computer.getName());
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	    }
	   
	}
}
